public class Adapter implements ITarget {
    private AdapteeAC220V inputAC220V;
    public Adapter(AdapteeAC220V inputAC220V){
        this.inputAC220V=inputAC220V;
    }
    public Adapter(){}
    @Override
    public int outPut5V() {
        int adapterInput = this.inputAC220V.outPutVoltage();
        int adapterOutput = adapterInput / 44;
        System.out.println("转换完成，输出电压为："+adapterOutput+"V");
        return adapterOutput;
    }

    @Override
    public int outPut12V() {
        int adapterInput = this.inputAC220V.outPutVoltage();
        int adapterOutput = adapterInput / 18;
        System.out.println("转换完成，输出电压为："+adapterOutput+"V");
        return adapterOutput;
    }

    @Override
    public int outPut24V() {
        int adapterInput = this.inputAC220V.outPutVoltage();
        int adapterOutput = adapterInput / 9;
        System.out.println("转换完成，输出电压为："+adapterOutput+"V");
        return adapterOutput;
    }
    public AdapteeAC220V getInputAC220V(){
        return inputAC220V;
    }
    public void setInputAC220V(AdapteeAC220V inputAC220V){
        this.inputAC220V=inputAC220V;
    }
}
